<template>
  <div class="dialog">
      <h3 @click="flag = true">点击打开</h3>
      我喜欢的运动是：
      <p v-for="(item, index) in list" v-show="item.check" :key="index">
          {{ item.ball }}
      </p>
      <Mark @send="fn" @sendList="sendList" v-show="flag"/>
  </div>
</template>

<script>
import Mark from './Mark'
import axiso from 'axios'
export default {
    components: {
        Mark
    },
    created() {
        axiso.get('/getList').then(res => {
            console.log(res)
        })
    },
    data() {
        return {
            flag: false,
            list: []
        }
    },
    methods: {
        fn(flag) {
            this.flag = flag
        },
        sendList(list) {
            this.list = list
        }
    }
}
</script>

<style>

</style>